package net.xiangcaowuyu.springcloud.service;

import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * 博客：https://www.xiangcaowuyu.net
 * Description:
 *
 * @Author: 香草物语
 * DateTime: 2021-07-24 18:15
 */
@Component
public class PaymentFeignHystrixFallback implements FallbackFactory<PaymentFeignHystrixService> {

    @Override
    public PaymentFeignHystrixService create(Throwable cause) {
        return new PaymentFeignHystrixService() {
            @Override
            public String paymentInfo_OK(Integer id) {
                return "paymentInfo_OK";
            }

            @Override
            public String paymentInfo_Timeout(Integer id) {
                return "paymentInfo_Timeout";
            }

            @Override
            public String zipkin() {
                return null;
            }
        };
    }
}